/** 2018/12/22
*作者:Cookie
*功能: 侧边菜单栏
*/
<template>
  <div>
    <el-menu
      default-active="5-1-1"
      class="el-menu-vertical-demo"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b"
      @open="handleOpen"
      @close="handleClose"
      :collapse="isCollapse">
      <el-submenu index="1">
        <template slot="title">
          <i class="el-icon-location"></i>
          <span slot="title">数据管理</span>
        </template>
        <el-menu-item-group>
          <!-- <span slot="title">数据统计</span> -->
          <el-menu-item index="1-1">110警情数据</el-menu-item>
          <el-menu-item index="1-2">执法办案数据</el-menu-item>
          <el-menu-item index="1-3"><router-link to="/dataManage/keyPerson">重点人员数据</router-link></el-menu-item>
          <el-menu-item index="1-4">流动人口数据</el-menu-item>
          <el-menu-item index="1-5">打处人员数据</el-menu-item>
          <el-menu-item index="1-6">人员信息数据</el-menu-item>
          <el-menu-item index="1-7"><router-link to="/dataManage/searchEngine">搜索引擎</router-link></el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-menu-item index="2">
        <i class="el-icon-menu"></i>
        <span slot="title">数据统计</span>
      </el-menu-item>
      <el-menu-item index="3">
        <i class="el-icon-document"></i>
        <span slot="title">实时数据展示</span>
      </el-menu-item>
      <el-menu-item index="4">
        <i class="el-icon-setting"></i>
        <span slot="title">分析预测</span>
      </el-menu-item>
      <el-submenu index="5">
        <template slot="title">
          <i class="el-icon-setting"></i>
          <span slot="title">报表申报</span>
        </template>
        <el-menu-item-group>
          <el-submenu index="5-1">
            <template slot="title">
              <i class="el-icon-setting"></i>
              <span slot="title">报警数据月报表</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="5-1-1">报警情况统计</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
        </el-menu-item-group>
      </el-submenu>
      <el-menu-item index="6">
        <i class="el-icon-setting"></i>
        <span slot="title">系统管理</span>
      </el-menu-item>
      <el-menu-item index="7">
        <i class="el-icon-setting"></i>
        <span slot="title">系统设置</span>
      </el-menu-item>
      <el-menu-item index="8">
        <i class="el-icon-setting"></i>
        <span slot="title">数据可视化</span>
      </el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  name: 'Menu',
  data() {
    return {
      isCollapse: false
    };
  },
  methods: {
    handleOpen(key, keyPath) {
      console.warn(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.warn(key, keyPath);
    }
  }
};
</script>

<style scoped>
.el-menu-vertical-demo:not(.el-menu--collapse){
  width      : 200px;
  min-height : 400px;
}
</style>
